package org.ywf.common.converter;

import org.ywf.common.entity.ReqHeader;

/**
 * TODO
 *
 * @Author YWF
 * @Date 2023/2/1 16:10
 */
public interface ProxyConverter<IREQ,REQ,IRES,RES> {

    IREQ convertReq(REQ request);

    RES convertRes(IRES response);

    default IREQ convertReq(REQ request, ReqHeader header){
        return this.convertReq(request);
    }

    default RES convertRes(IRES response, REQ request){
        return this.convertRes(response);
    }

}
